﻿using System;
using System.Collections.Generic;
using System.Windows;
using MathematicallySafe.HeadCounter.Data;
using MathematicallySafe.HeadCounter.Data.Common;
using MathematicallySafe.HeadCounter.Data.Models;

namespace MathematicallySafe.HeadCounter.Services.Forums
{
    public class ForumPostingService : IForumPostingService
    {
        private ForumRaiderSummaryPost _raiderSummaryPost;
        private ForumRaidPost _forumRaidPost;

        public ForumPostingService(IForumFormatter format)
        {
            _raiderSummaryPost = new ForumRaiderSummaryPost(format);
            _forumRaidPost = new ForumRaidPost(format);
        }

        public void PostGuildSummary(IEnumerable<Raider> raiders)
        {
            string post = "";
            raiders.ForEach(r => post += _raiderSummaryPost.Generate(r));

            Clipboard.SetDataObject(post);
        }

        public void PostRaid(Raid raid)
        {
            Clipboard.SetDataObject(_forumRaidPost.Generate(raid));
        }

        public void PostRaider(Raider raider)
        {

        }

    }
}


